package two.chapter_1.c1_1;

import edu.princeton.cs.algs4.StdOut;

public class Ex1_1_11 {

    public static void main(String[] args) {

        boolean[][] booleans = new boolean[10][10];
        booleans[0][0] = true;
        booleans[1][1] = true;
        booleans[2][2] = true;
        booleans[3][3] = true;
        booleans[4][4] = true;
        booleans[5][5] = true;
        booleans[6][6] = true;
        booleans[7][7] = true;
        booleans[8][8] = true;
        booleans[9][9] = true;
        for (int j = 0; j < 10; j++) {
            StdOut.print(" "+j);
        }
        StdOut.print("\n");
        for (int i = 0; i < 10; i++) {
            StdOut.print(i);
            for (int j = 0; j < 10; j++) {
                //StdOut.print("列号："+j);
                if (booleans[i][j]){
                    StdOut.print("*");
                }else {
                    StdOut.print("  ");
                }
            }
            StdOut.print("\n");
        }

    }


}
